hvm, vtpm: Fix wait for an outstanding response.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 19 Feb 2007 15:51:46 +0000 (15:51 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 19 Feb 2007 15:51:46 +0000 (15:51 +0000)
Post the interrupt upon reception of the response and adapt the
state machine.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
tools/ioemu/hw/tpm_tis.c

index 926a69792393209e75b9014fda40ce13117fc230..29bb14c9423afde2734c04c485478a6a54157673 100644 (file)
@@ -769,6 +769,8 @@ static void tpm_save(QEMUFile* f,void* opaque)
             if (n > 0) {
                 if (IS_VALID_LOC(s->active_loc)) {
                     s->loc[s->active_loc].sts = STS_VALID | STS_DATA_AVAILABLE;
+                    s->loc[s->active_loc].state = STATE_COMPLETION;
+                    tis_raise_irq(s, s->active_loc, INT_DATA_AVAILABLE);
                 }
                 /* close the connection with the vTPM for good */
                 close_vtpm_channel(s, 1);